package scenic;

import scenic.filter.Filter;
import scenic.jni.Renderer;

class DrawContext implements Cloneable {
	public Device device;
	public SceneParent root;
	public Object renderingInstance;
	public int context;
	public int width;
	public int height;
	public Renderer renderer;
	public int surfaceType = Renderer.SURFACE_TYPE_COLOR;
	public Filter antialiasingFilter;

	public DrawContext() {		
	}

	public DrawContext(DrawContext context, int surfaceType) {
		this.renderingInstance = context.renderingInstance;
		this.root = context.root;
		this.device = context.device;
		this.context = context.context;
		this.width = context.width;
		this.height = context.height;
		this.renderer = context.renderer;
		this.surfaceType = surfaceType;
	}
	
	public DrawContext clone() {
		try {
			return (DrawContext)super.clone();
		} catch(CloneNotSupportedException e) {
				return null;
		}
	}
}
